//2.11
import java.util.Scanner;
public class PopulationProjection {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long currentPopulation = 312032486;
        int secondsInYear = 365 * 24 * 60 * 60;
        System.out.print("Enter the number of years: ");
        int years = scanner.nextInt();
        long birthsPerYear = secondsInYear / 7;
        long deathsPerYear = secondsInYear / 13;
        long immigrantsPerYear = secondsInYear / 45;
        long futurePopulation = currentPopulation;
        for (int i = 0; i < years; i++) {
            futurePopulation += birthsPerYear - deathsPerYear + immigrantsPerYear;
        }
        System.out.println("The population in " + years + " years is " + (int)futurePopulation);
    }
}